package com.yyfax.pay.common.filter;

import org.slf4j.MDC;
import org.springframework.core.task.TaskDecorator;

import java.util.Map;

public class JawsThreadDecorator implements TaskDecorator {
  
   @Override
   public Runnable decorate(Runnable runnable) {
     Map<String, String> contextMap = MDC.getCopyOfContextMap();
       try {
           runnable.run();
       } finally {
           MDC.clear();
       }
       return runnable;
   }
 }